import request from '@/utils/request'

export function list(data) {
  return request({
    url: '/app/list',
    method: 'get',
    params: data
  })
}

export function save(data) {
  return request({
    url: '/app/save',
    method: 'post',
    data: data
  })
}

export function update(data) {
  return request({
    url: '/app/update',
    method: 'post',
    data: data
  })
}

export function toggleAppStatus(data) {
  return request({
    url: '/app/toggleStatus',
    method: 'post',
    data: data
  })
}


export function deleteByIds(data) {
  return request({
    url: '/app/deleteByIds?ids=' + data.ids,
    method: 'post',
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    data: data
  })
}




export function updateImageSizeConfig(data) {
  return request({
    url: '/image_size_config/updateImageSizeConfig',
    method: 'post',
    data: data
  })
}

export function getImageSizeConfigList(data) {
  return request({
    url: '/image_size_config/getImageSizeConfigList',
    method: 'get',
    data: data
  })
}




export function getWeChatConfig(data) {
  return request({
    url: '/app/getWeChatConfig',
    method: 'get',
    data: data
  })
}
export function saveWeChatConfig(data) {
  return request({
    url: '/app/saveWeChatConfig',
    method: 'post',
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    data: data
  })
}



export function getWebDriverConfig(data) {
  return request({
    url: '/app/getWebDriverConfig',
    method: 'get',
    data: data
  })
}
export function saveWebDriverConfig(data) {
  return request({
    url: '/app/saveWebDriverConfig',
    method: 'post',
    data: data
  })
}



export function getAdUnitIdConfig(data) {
  return request({
    url: '/app/getAdUnitIdConfig',
    method: 'get',
    data: data
  })
}
export function saveAdUnitIdConfig(data) {
  return request({
    url: '/app/saveAdUnitIdConfig',
    method: 'post',
    data: data
  })
}

